/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.persistencia.domain;

import java.io.Serializable;
import javax.persistence.*;

/**
 *
 * @author kenny
 */
@Entity
@Table(name = "cicloxperiodo")
@NamedQueries({
    @NamedQuery(name = "Cicloxperiodo.findAll", query = "SELECT c FROM Cicloxperiodo c"),
    @NamedQuery(name = "Cicloxperiodo.findByNCicAcdId", query = "SELECT c FROM Cicloxperiodo c WHERE c.nCicAcdId = :nCicAcdId"),
    @NamedQuery(name = "Cicloxperiodo.findByNCicHoraIni", query = "SELECT c FROM Cicloxperiodo c WHERE c.nCicHoraIni = :nCicHoraIni"),
    @NamedQuery(name = "Cicloxperiodo.findByNCicHoraFin", query = "SELECT c FROM Cicloxperiodo c WHERE c.nCicHoraFin = :nCicHoraFin"),
    @NamedQuery(name = "Cicloxperiodo.findByNCicSabHoraIni", query = "SELECT c FROM Cicloxperiodo c WHERE c.nCicSabHoraIni = :nCicSabHoraIni"),
    @NamedQuery(name = "Cicloxperiodo.findByNCicSabHoraFin", query = "SELECT c FROM Cicloxperiodo c WHERE c.nCicSabHoraFin = :nCicSabHoraFin")})
public class Cicloxperiodo implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "nCicAcdId")
    private Integer nCicAcdId;
    @Column(name = "nCicHoraIni")
    private Integer nCicHoraIni;
    @Column(name = "nCicHoraFin")
    private Integer nCicHoraFin;
    @Column(name = "nCicSabHoraIni")
    private Integer nCicSabHoraIni;
    @Column(name = "nCicSabHoraFin")
    private Integer nCicSabHoraFin;
    @JoinColumn(name = "nCicAcdId", referencedColumnName = "nCicAcdId", insertable = false, updatable = false)
    @OneToOne(optional = false)
    private Cicloacademico cicloacademico;

    public Cicloxperiodo() {
    }

    public Cicloxperiodo(Integer nCicAcdId) {
        this.nCicAcdId = nCicAcdId;
    }

    public Integer getNCicAcdId() {
        return nCicAcdId;
    }

    public void setNCicAcdId(Integer nCicAcdId) {
        this.nCicAcdId = nCicAcdId;
    }

    public Integer getNCicHoraIni() {
        return nCicHoraIni;
    }

    public void setNCicHoraIni(Integer nCicHoraIni) {
        this.nCicHoraIni = nCicHoraIni;
    }

    public Integer getNCicHoraFin() {
        return nCicHoraFin;
    }

    public void setNCicHoraFin(Integer nCicHoraFin) {
        this.nCicHoraFin = nCicHoraFin;
    }

    public Integer getNCicSabHoraIni() {
        return nCicSabHoraIni;
    }

    public void setNCicSabHoraIni(Integer nCicSabHoraIni) {
        this.nCicSabHoraIni = nCicSabHoraIni;
    }

    public Integer getNCicSabHoraFin() {
        return nCicSabHoraFin;
    }

    public void setNCicSabHoraFin(Integer nCicSabHoraFin) {
        this.nCicSabHoraFin = nCicSabHoraFin;
    }

    public Cicloacademico getCicloacademico() {
        return cicloacademico;
    }

    public void setCicloacademico(Cicloacademico cicloacademico) {
        this.cicloacademico = cicloacademico;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (nCicAcdId != null ? nCicAcdId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Cicloxperiodo)) {
            return false;
        }
        Cicloxperiodo other = (Cicloxperiodo) object;
        if ((this.nCicAcdId == null && other.nCicAcdId != null) || (this.nCicAcdId != null && !this.nCicAcdId.equals(other.nCicAcdId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.persistencia.domain.Cicloxperiodo[ nCicAcdId=" + nCicAcdId + " ]";
    }
    
}
